import { LocalizationContext, MenuItem } from "../../core";

import PrintIcon from "./PrintIcon";
import { FC, useContext } from "react";

export interface PrintMenuItemProps {
  onClick(): void;
}

const PrintMenuItem: FC<PrintMenuItemProps> = ({ onClick }) => {
  const l10n = useContext(LocalizationContext);
  const label = l10n && l10n.print ? l10n.print.print : "Print";

  return (
    <MenuItem icon={<PrintIcon />} onClick={onClick}>
      {label}
    </MenuItem>
  );
};

export default PrintMenuItem;
